-extends 'layouts/_widget_box.haml'

-block widget_title
  Program Info

-block widget_help
  program_info

-block widget_id
  program_info_widget

-block main
  %ul.info-list
    %li.float-element
      %label
        Code
      %span
        %strong
          =instance.slug
    %li.float-element
      %label
        Title
      %span
        %strong
          =instance.title
    %li.float-element
      %label
        Kind
      %span
        -if instance.company_controls
          %i.grcicon-control-color
        -else
          %i.grcicon-program-color
        =instance.kind
        Program
    %li
      %label
        Description
      -if instance.description != ""
        -# FIXME: Write display_as_html helper
        =#display_as_html instance.description
      -else
        .rtf
          %p.no-data no description available
    -if instance.url
      %li.float-element
        %label
          Direct link
        %span
          -# FIXME: 'href': "={absolute_url(instance.url)}"
          %a.inner-element{ 'href': "={instance.url}", 'target': '_blank' }
            =instance.url

  %section.footer
    .row-fluid
      .span6
        %p.footer-left
          Created: ={instance.created_at.strftime("%m/%d/%y")}
